commonlibsse_ng\re\a/
ActorValues.rs

1/// `u8::MAX`(`255`)
2///It is also a key for LocalMap.
3///
4///# Notes
5///In C++ it is `c_char`, but that would be i8 in MSVC, so anything above 127 is meaningless, but perhaps wrap?
6#[commonlibsse_ng_derive_internal::ffi_enum]
7#[repr(u32)]
8#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
9pub enum ActorValue {
10    #[default]
11    None = u32::MAX,
12    Aggression = 0,
13    Confidence = 1,
14    Energy = 2,
15    Morality = 3,
16    Mood = 4,
17    Assistance = 5,
18    OneHanded = 6,
19    TwoHanded = 7,
20    Archery = 8,
21    Block = 9,
22    Smithing = 10,
23    HeavyArmor = 11,
24    LightArmor = 12,
25    Pickpocket = 13,
26    Lockpicking = 14,
27    Sneak = 15,
28    Alchemy = 16,
29    Speech = 17,
30    Alteration = 18,
31    Conjuration = 19,
32    Destruction = 20,
33    Illusion = 21,
34    Restoration = 22,
35    Enchanting = 23,
36    Health = 24,
37    Magicka = 25,
38    Stamina = 26,
39    HealRate = 27,
40    MagickaRate = 28,
41    StaminaRate = 29,
42    SpeedMult = 30,
43    InventoryWeight = 31,
44    CarryWeight = 32,
45    CriticalChance = 33,
46    MeleeDamage = 34,
47    UnarmedDamage = 35,
48    Mass = 36,
49    VoicePoints = 37,
50    VoiceRate = 38,
51    DamageResist = 39,
52    PoisonResist = 40,
53    ResistFire = 41,
54    ResistShock = 42,
55    ResistFrost = 43,
56    ResistMagic = 44,
57    ResistDisease = 45,
58    PerceptionCondition = 46,
59    EnduranceCondition = 47,
60    LeftAttackCondition = 48,
61    RightAttackCondition = 49,
62    LeftMobilityCondition = 50,
63    RightMobilityCondition = 51,
64    BrainCondition = 52,
65    Paralysis = 53,
66    Invisibility = 54,
67    NightEye = 55,
68    DetectLifeRange = 56,
69    WaterBreathing = 57,
70    WaterWalking = 58,
71    IgnoreCrippledLimbs = 59,
72    Fame = 60,
73    Infamy = 61,
74    JumpingBonus = 62,
75    WardPower = 63,
76    RightItemCharge = 64,
77    ArmorPerks = 65,
78    ShieldPerks = 66,
79    WardDeflection = 67,
80    Variable01 = 68,
81    Variable02 = 69,
82    Variable03 = 70,
83    Variable04 = 71,
84    Variable05 = 72,
85    Variable06 = 73,
86    Variable07 = 74,
87    Variable08 = 75,
88    Variable09 = 76,
89    Variable10 = 77,
90    BowSpeedBonus = 78,
91    FavorActive = 79,
92    FavorsPerDay = 80,
93    FavorsPerDayTimer = 81,
94    LeftItemCharge = 82,
95    AbsorbChance = 83,
96    Blindness = 84,
97    WeaponSpeedMult = 85,
98    ShoutRecoveryMult = 86,
99    BowStaggerBonus = 87,
100    Telekinesis = 88,
101    FavorPointsBonus = 89,
102    LastBribedIntimidated = 90,
103    LastFlattered = 91,
104    MovementNoiseMult = 92,
105    BypassVendorStolenCheck = 93,
106    BypassVendorKeywordCheck = 94,
107    WaitingForPlayer = 95,
108    OneHandedModifier = 96,
109    TwoHandedModifier = 97,
110    MarksmanModifier = 98,
111    BlockModifier = 99,
112    SmithingModifier = 100,
113    HeavyArmorModifier = 101,
114    LightArmorModifier = 102,
115    PickpocketModifier = 103,
116    LockpickingModifier = 104,
117    SneakingModifier = 105,
118    AlchemyModifier = 106,
119    SpeechcraftModifier = 107,
120    AlterationModifier = 108,
121    ConjurationModifier = 109,
122    DestructionModifier = 110,
123    IllusionModifier = 111,
124    RestorationModifier = 112,
125    EnchantingModifier = 113,
126    OneHandedSkillAdvance = 114,
127    TwoHandedSkillAdvance = 115,
128    MarksmanSkillAdvance = 116,
129    BlockSkillAdvance = 117,
130    SmithingSkillAdvance = 118,
131    HeavyArmorSkillAdvance = 119,
132    LightArmorSkillAdvance = 120,
133    PickpocketSkillAdvance = 121,
134    LockpickingSkillAdvance = 122,
135    SneakingSkillAdvance = 123,
136    AlchemySkillAdvance = 124,
137    SpeechcraftSkillAdvance = 125,
138    AlterationSkillAdvance = 126,
139    ConjurationSkillAdvance = 127,
140    DestructionSkillAdvance = 128,
141    IllusionSkillAdvance = 129,
142    RestorationSkillAdvance = 130,
143    EnchantingSkillAdvance = 131,
144    LeftWeaponSpeedMultiply = 132,
145    DragonSouls = 133,
146    CombatHealthRegenMultiply = 134,
147    OneHandedPowerModifier = 135,
148    TwoHandedPowerModifier = 136,
149    MarksmanPowerModifier = 137,
150    BlockPowerModifier = 138,
151    SmithingPowerModifier = 139,
152    HeavyArmorPowerModifier = 140,
153    LightArmorPowerModifier = 141,
154    PickpocketPowerModifier = 142,
155    LockpickingPowerModifier = 143,
156    SneakingPowerModifier = 144,
157    AlchemyPowerModifier = 145,
158    SpeechcraftPowerModifier = 146,
159    AlterationPowerModifier = 147,
160    ConjurationPowerModifier = 148,
161    DestructionPowerModifier = 149,
162    IllusionPowerModifier = 150,
163    RestorationPowerModifier = 151,
164    EnchantingPowerModifier = 152,
165    DragonRend = 153,
166    AttackDamageMult = 154,
167    HealRateMult = 155,
168    MagickaRateMult = 156,
169    StaminaRateMult = 157,
170    WerewolfPerks = 158,
171    VampirePerks = 159,
172    GrabActorOffset = 160,
173    Grabbed = 161,
174    DEPRECATED05 = 162,
175    ReflectDamage = 163,
176}
177
178/// Since ActorValueType is separated by u32 and u8, we have no choice but to have a separate type.
179///
180/// Use `to_enum`/`from_enum`
181#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
182#[repr(transparent)]
183pub struct ActorValue_u8(pub u8);
184
185impl ActorValue_u8 {
186    #[inline]
187    pub const fn to_enum(self) -> Option<ActorValue> {
188        ActorValue_CEnum(self.0 as u32).to_enum()
189    }
190
191    #[inline]
192    pub const fn from_enum(value: ActorValue) -> Self {
193        Self(ActorValue_CEnum::from_enum(value).0 as u8)
194    }
195}
196
197#[commonlibsse_ng_derive_internal::ffi_enum]
198#[repr(u32)]
199#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
200pub enum ACTOR_VALUE_MODIFIER {
201    Permanent = 0,
202    Temporary = 1,
203    Damage = 2,
204}